﻿@{
    ViewBag.Title = "收入管理列表";
    Layout = "~/Views/Shared/_LayoutList.cshtml"; 
}
@(       
 Html.nbGridFor<Revenue>(s =>
 {
     s.Action("List");
     s.Columns(c =>
    {
        c.Bind(e => e.Id).IsKey();
        c.BindDateTime(e => e.Date).AsSearch();
        c.BindEnum(e => e.SiteId, "ProjectSite").Align(GridAlign.Left).Width(140);
        c.Bind(e => e.EstimateAmount).AsSearch(SearchControlType.NumberBlock).Width(50).Align(GridAlign.Right);
        c.Bind(e => e.SellAmount).AsSearch(SearchControlType.NumberBlock).Width(50).Align(GridAlign.Right);
        c.Bind(e => e.ItemDesc).AsSearch();
        c.Bind(e => e.UpdateUser).Width(60);
        c.BindDateTime(e => e.UpdateDate);
        c.BindTemplate()
            .Template(Url.GridRowEditLink("编辑"))
            .Template(Url.GridRowDeleteLink("SiteName"));
    });
     s.Buttons(b =>
      {
          b.BindAddButton("生成当天收入");
          b.BindDeleteButton();
      });
 }))